package com.zt.location.modules.business.threadpool.task;
 

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.concurrent.Future;
import org.springframework.scheduling.annotation.AsyncResult; 

import com.zt.location.modules.business.ReckonRange; 
 
@Service
public class AsyncServiceImpl implements AsyncService {

    private static final Logger logger = LoggerFactory.getLogger(AsyncServiceImpl.class);

    @Autowired
    private ReckonRange reckonRange; 
    
    @Async("asyncServiceExecutor")
    public Future<String> executeAsyncReturnFuture(String locationData) {  
    	Future<String> future=null; 
    	String warnIp = reckonRange.compareRange(locationData);
		future = new AsyncResult<String>(warnIp); 
    	return future; 
    }
     
}